package com.more.offer.designpatterns.singleton.eagerinitialization;

/**
 * @author pinoc
 * @date 2021/10/22
 * @description 使用静态块初始化实例 并提供异常处理
 */
public class SingletonStaticBlockInit {

	private static SingletonStaticBlockInit singletonModel;

	static{
		try{
			singletonModel = new SingletonStaticBlockInit();
		}catch (Exception e) {
				throw new RuntimeException(e);
		}
	}

	public static SingletonStaticBlockInit getInstance() {
		return singletonModel;
	}
}
